<?php

declare(strict_types=1);
/**
 * This file is part of MineAdmin.
 *
 * @link     https://www.mineadmin.com
 * @document https://doc.mineadmin.com
 * @contact  root@imoi.cn
 * @license  https://github.com/mineadmin/MineAdmin/blob/master/LICENSE
 */

namespace App\Model;

use Hyperf\Database\Model\Relations\BelongsTo;
use Hyperf\Database\Model\Relations\HasMany;
class OrderDetail extends Model
{
    public bool $timestamps = true;

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'order_detail';

    protected array $guarded = [];

    protected array $casts = [
        'created_at'=>'datetime',
        'updated_at'=>'datetime'
    ];

    public function order():BelongsTo{
        return $this->belongsTo(Order::class,'number','number');
    }
}
